<script setup lang="ts">
import { ref, inject } from 'vue';
import ModalContent from './modal-content.vue';

const ModalService = inject('ModalService');
const visiable = ref(false);
function acceptCallback() {
    alert('accepted');
}

function rejectCallback() {
    alert('rejected');
}

function toggleModal() {
    ModalService.show({
        render: ModalContent.render,
        acceptCallback,
        rejectCallback
    });
}
</script>
<template>
    <f-button @click="toggleModal">click to popup modal dialog {{ visiable }}</f-button>
</template>
